/*******************************************************************************
*  file    : uzmainwindow.h
*  created : 06.05.2013
*  author  : 
*******************************************************************************/

#ifndef UZMAINWINDOW_H
#define UZMAINWINDOW_H

#include <QMainWindow>
#include <QNetworkAccessManager>
#include <uzdatagetter.hpp>

namespace Ui {
class uzMainWindow;
}


class uzMainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit uzMainWindow(QWidget *parent = 0);
    ~uzMainWindow();
public slots:
    void loadUzPage();
    void finishLoad();
    void loadCities();
    void finishLoadCities();
    void loadTicketInfo();
    void finishLoadTicketInfo();
private slots:
    void onEditTextChanged(const QString & text);
    void onCitiesLoaded   ();
    void onTrainData      ();
    void requestTicketsInfo();
private:
    Ui::uzMainWindow*      ui;
    QNetworkAccessManager* accessManager_;
    UzDataGetter*          getter_;

    int                    ticket_info_id;//для отслеживания уникальности запросов
};

#endif // UZMAINWINDOW_H
